package com.vip.zj.type.txt;

import com.vip.zj.utils.ReadFilesUtils;

import java.io.File;

/**
 *
 */
public class ReadFiles {
    public static void main(String[] args) {
//        //读取条数
        Object o = ReadFilesUtils.ReadFilesUtil("D:\\标注分类\\标注好的已发图片");
        System.out.println(o);

//        替换数据
//        unread("D:\\标注分类\\标注好未发图片","D:\\标注分类\\tool\\未发\\桩工机械");
    }


    public static void unread(String url,String localUrl) {
        File file = new File(url);
        if (file.isDirectory()){
            unreadFiles(file,localUrl);
        }else{
         ReadFilesUtils.unread(file,localUrl);
        }
    }

    public static void unreadFiles(File file,String localUrl) {
        File[] files = file.listFiles();
        for (File file1 : files) {

            if (file1.isDirectory()) {
                unreadFiles(file1,localUrl);
            } else {
                ReadFilesUtils.unread(file1,localUrl);
            }

        }
    }

}
